import sys
from PyQt5.QtWidgets import QApplication

from flight_plan_method import FlightPlanMainWindow

###编写公共类COmmomHelper
class CommonHelper:
    def __init__(self):
        pass

    @staticmethod
    def readQss(style):
        with open(style, 'r') as f:
            return f.read()

if __name__ == '__main__':
    app = QApplication(sys.argv)
    myWin = FlightPlanMainWindow()
    ###主函数加载QSS文件-界面与美化相分离
    styleFile = './qss/flight_plan.qss'
    qssStyle = CommonHelper.readQss(styleFile)
    myWin.setStyleSheet(qssStyle)
    ###
    myWin.show()
    sys.exit(app.exec_())